<%--
  Created by IntelliJ IDEA.
  User: DYS
  Date: 2022/1/15
  Time: 15:52
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>

<html>
<head>
    <title>Title</title>
</head>
<body>
<br/>
<jsp:include page="top.jsp"></jsp:include>
<hr/>
<table border="1px">
    <tr>
        <th>菜品图片</th>
        <th>菜品名称</th>
        <th>菜品类别</th>
        <th>原料</th>
        <th>单价</th>
        <th>说明</th>
        <th>还原</th>
        <th>永久删除</th>
    </tr>
    <c:forEach items="${dellist}" var="cp">
        <tr>
            <td><div style="text-align: center"><img src="${cp.cpPicInsert}", width="100" height="100" ></div></td>
            <td>${cp.cpmc}</td>
            <td>${cp.cplb.cpname}</td>
            <td>${cp.yl}</td>
            <td>${cp.dj}</td>
            <td>${cp.shm}</td>
            <td><a href="/dcxtmv/cp/reBackCp.do?id=${cp.id}" onclick="return origConfirm()">还原</a></td>
            <td><a href="/dcxtmv/cp/relDelCp.do?id=${cp.id}" onclick="return delConfirm()">删除</a></td>
        </tr>
    </c:forEach>
</table>
<script>
    function delConfirm() {
        if (confirm("确认永久删除？")) {
            return true;
        } else {
            return false;
        }
    }
    function origConfirm() {
        if (confirm("确认还原菜品？")) {
            return true;
        } else {
            return false;
        }
    }
</script>
</body>
</html>